import React, { useEffect } from 'react';
import ProjectTable from './component/projecttable';
import CreateProjectModal from './component/createprojectmodal';
import axios from 'axios';
import ProjectSearch from './component/projectsearch';
import './project.less';

const Project = () => {
  const create_project_click = () => {};

  useEffect(() => {
    axios.get('/api/projects');
  }, []);
  return (
    <div className=''>
      <div className='project_title_wrap'>
        <h1>项目列表</h1>
        <button onClick={create_project_click}>创建项目</button>
      </div>
      <div className='project_search_wrap'>
        <ProjectSearch />
      </div>
      <div className='project_table_wrap'>
        <ProjectTable />
      </div>
      <CreateProjectModal />
    </div>
  );
};

export default Project;
